<?php
/**
 * KvFramework markup generator functions
 * @package KvFramework_v2
 * @subpackage KvF_Markup
 * @author Greg McWhirter <gsmcwhirter@gmail.com>
 * @copyright Copyright &copy; 2006, Greg McWhirter
 * @version $Revision$
 */

load_files(
  KVF_FRAMEWORK."/kvf_markup/exceptions/kvf_markup.exception.php"
);

/**
 * Markup generator class
 * @package KvFramework_v2
 * @subpackage KvF_Markup
 */
abstract class KvfMarkup
{
  
  /**
   * Generates javascript tags for some file names
   *
   * @param array $files
   * @return string
   */
  public static function JavascriptTag(array $files)
  {
    $ret = "";
    foreach($files as $file)
    {
      $ret .= "<script
  src=\"".CONFIG::BASEURI."/javascripts/".$file."\"
	type=\"text/javascript\"></script>
";
    }

    return $ret;
  }
  
  public static function StylesheetTag(array $files, $media = "all")
  {
    $ret = "";
    foreach($files as $file)
    {
      $ret .= "<link
  href=\"".CONFIG::BASEURI."/css/".$file."\"
	rel=\"stylesheet\"
	type=\"text/css\"
	media=\"".$media."\" />
";
    }
    
    return $ret;
  }
}
?>
